Module unique id

Dear DXL supporters

I would like to create a custom attribute in my document where the value is a combination of the module unique ID and the absolute number.

I have searched on several websites where the dxl code lists the unique id of the module based on the selected object on the project explorer.

Is there a way to perform the same task independent of the selected object in the project explorer, since every time a different module is selected at the explorer my dxl refresh and the wrong ID is displayed?

Many thanks for your help
Vassilis
SystemAdmin - Mon Oct 15 11:25:09 EDT 2012

Re: Module unique id
OurGuest - Mon Oct 15 14:11:38 EDT 2012

Try following as an attribute dxl:

//uid
/*UID*/
obj.attrDXLName = uniqueID(current Module) ":" obj."Absolute Number" ""

Re: Module unique id
llandale - Mon Oct 15 15:27:54 EDT 2012

OurGuest - Mon Oct 15 14:11:38 EDT 2012

Try following as an attribute dxl:

//uid
/*UID*/
obj.attrDXLName = uniqueID(current Module) ":" obj."Absolute Number" ""

This may be over-paranoid and persnickedy, but perhaps instead this:

obj.attrDXLName = uniqueID(module(obj)) ":" obj."Absolute Number" ""

That is just consistent with my crusade against using "current" unless absolutely necissary.

-Louie

Re: Module unique id
SystemAdmin - Tue Oct 16 03:54:19 EDT 2012

This is perfect!

Thank you very much both of you for the very quick reply!
Vassilis